compatibility fix for Qt 4.6.
authortsteven4 <tsteven4@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Thu, 15 Aug 2013 23:05:01 +0000 (23:05 +0000)
committertsteven4 <tsteven4@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Thu, 15 Aug 2013 23:05:01 +0000 (23:05 +0000)
gpsbabel/kml.cc
gpsbabel/src/core/datetime.h
gpsbabel/tiger.cc
gpsbabel/waypt.cc

index 7a39fb915adf49bcc472444cf62cc58f0342eb93..23e379cdd1538800c017c3811e2015765c6685c5 100644 (file)
@@ -1844,7 +1844,7 @@ void kml_write_AbstractView(void)
       // the network position.  So we shove the end of the timespan out to
       // ensure the right edge of that time slider includes us.
       //
-      time_max = realtime_positioning ? kml_time_max + 600 : kml_time_max;
+      time_max.setTime_t(realtime_positioning ? kml_time_max.toTime_t() + 600 : kml_time_max.toTime_t());
       writer->writeTextElement("end", time_max.toPrettyString());
     }
     writer->writeEndElement(); // Close gx:TimeSpan tag
index 4f08a88f44242b3f1be6e408541864445200ce08..b0e24eb9e618705ecb9cbce611f430cf8d1bfd3a 100644 (file)
@@ -55,14 +55,6 @@ public:
     return toTime_t();
   }
 
-  DateTime operator+(quint64 seconds) {
-    return DateTime::fromMSecsSinceEpoch(toMSecsSinceEpoch() + seconds*1000);
-  }
-
-  DateTime operator-(quint64 seconds) {
-    return DateTime::fromMSecsSinceEpoch(toMSecsSinceEpoch() - seconds*1000);
-  }
-
   // Integer form: YYMMDD
   int ymd() const {
     QDate d(date());
index b39c836cd7803041b6d49b9956dee334c4d97711..a071aa498cc9d1b030c3bea58e8f4c623eba1f4c 100644 (file)
@@ -189,7 +189,7 @@ tiger_disp(const waypoint *wpt)
     pin = wpt->icon_descr;
   } else if (wpt->icon_descr.contains("-unfound")) {
     pin = unfoundmarker;
-  } else if (wpt->GetCreationTime() > current_time() - 3600 * 24 * thresh_days) {
+  } else if (wpt->GetCreationTime().toTime_t() > current_time().toTime_t() - 3600 * 24 * thresh_days) {
     pin = newmarker;
   } else {
     pin = oldmarker;
index 45fd0fa75c43c6ae6c22bfe702380f8f86b1157e..e5650ce72bcd8cf5074ea93c705da19a0f32badc 100644 (file)
@@ -545,7 +545,7 @@ waypt_time(const waypoint *wpt)
   if (!wpt->creation_time.isValid()) {
     return (double) 0;
   } else {
-    return ((double)wpt->creation_time.toMSecsSinceEpoch()) / 1000.0;
+    return (double)wpt->creation_time.toTime_t();
   }
 }